#ifndef _APP_HTTP_H
#define _APP_HTTP_H

#include "sys/socket.h"
#include "esp_http_client.h"
#include <netdb.h>

#define APPID "17769781"
#define APPSECRET "5IbudTJx"
#define Shenzhen "101280601"
#define Guangzhou "101280101"

#define My_http_host "www.tianqiapi.com"  //把双引号内的host 改成你实际的host
#define My_http_path "free/day"  //把双引号内的path 改成你实际的path
#define MY_http_url "http://www.tianqiapi.com/free/day?appid=" APPID "&appsecret=" APPSECRET "&unescape=1&cityid=" Shenzhen

extern esp_http_client_handle_t http_client;
void http_request_weather(void* arg);

typedef enum {
    MANY = 10,
    CLOUD,
    TURN,
    SUNNY,
    RAIN,
    GHEAVY,
    LIGTH,
    BURST,
    THUNDER,
}ch_wea;
extern char http_user_data[1024];
extern bool http_data_update_flag;
#endif
